package com.tang.param_check.common.logprinter;

import com.tang.param_check.domain.LogDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2022/1/15 21:05
 * @Desc
 * @Remarks
 */
@Slf4j
@Component
public class InfoPrinterHandler extends AbstractPrintHandler {
    @Override
    public Integer getOrder() {
        return 1;
    }

    @Override
    public boolean canHandler(LogDTO parameter) {
        return Objects.equals(parameter.getMessageType(), Integer.valueOf(1));
    }

    @Override
    public Void handler(LogDTO parameter) {
        log.info("InfoPrinterHandler:{}",parameter.getMessage());
        return null;
    }
}